package com.huatai.user.mapper;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.huatai.user.entity.Department;
import com.huatai.user.vo.DepartmentVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 部门管理
 */
public interface DepartmentMapper extends BaseMapper<Department> {
	@Select("SELECT * FROM sys_department ${ew.customSqlSegment}")
	List<DepartmentVo> getDeptList(@Param(Constants.WRAPPER) LambdaQueryWrapper wrapper);

	@Select("SELECT id,dept_name as json_title FROM sys_department where id" +
		" in(\"1\",\"1710944375199313921\",\"1764596398950514689\",\"1710944424092315650\",\"1764596693667479553\",\"1710945497083359233\",\"1772139674695933954\")")
	List<JSONObject> getDeptLists();
}
